import matplotlib.pyplot as plt
score = [12,54,64,61,23,748,64,78,565,4,638,456,845,845,686,456,845,686,456,54,8,484,564,12,324,641]
plt.rcParams['font.sans-serif']=['SimHei']
plt.xlabel('分数')
plt.ylabel('学生数量')
plt.title('学生数学成绩分布直方图')
plt.hist(score,bins=range(0,150,10),facecolor='pink',edgecolor='bule')
plt.show()